#include "stdafx.h"
#include <iostream>
#include "character.h"
#include "state.h"
#include "home.h"
#include "bank.h"
#include "mine.h"
#include "saloon.h"
using namespace std;



AICHARACTER::AICHARACTER(std::string theName) :
                mPcurstate(Home::Instance()),
                gold(0),
                money(0),
                fatigue(0),
                rest(0),
                location(2),
                thirst(0),
                name(theName)
{}

void AICHARACTER::changeState(State *pNewState)
{
	mPcurstate->Exit(this);

	mPcurstate = pNewState;

	mPcurstate->Enter(this);
}

void AICHARACTER::update()
{
	thirst++;
	if(mPcurstate)
		mPcurstate->Execute(this);
}
